package memleak.test.com.testlist;

/**
 * Created by runrun on 2017/2/13.
 */

public final class Constant {

    /**
     * MediaPlayer自带播放错误码
     */
    public static final String MEDIA_ERROR_IO = "网络操作错误\n";
    public static final String MEDIA_ERROR_MALFORMED = "编码错误\n";
    public static final String MEDIA_ERROR_UNSUPPORTED = "网络操作错误\n";
    public static final String MEDIA_ERROR_TIMED_OUT = "超时\n";
    public static final String MEDIA_ERROR_UNKNOWN = "未知错误\n";

    /**
     * 自定义播放错误状态码
     */
    public static final int ERROR_NO_PROGRESS = 9001;
    public static final int ERROR_NO_URL = 9002;

    /**
     * 全屏尺寸
     */
    public static final int FULL_SCREEN_SIZE_WIDTH = 1920;
    public static final int FULL_SCREEN_SIZE_HEIGHT = 1080;

    /**
     * 请求单播数据超时时间
     */
    public static final int NETWORK_CONNECT_MAX_TIMEOUT = 8000;

    /**
     * 1分钟
     */
    public static final int DEFAULT_PLAY_TIME = 60;

    /**
     * 喜爱频道
     */
    public static final String FAVORITE_CATEGORY = "1000009";
    public static final String ALL_CHANNEL_CATEGORY = "1000001";

    /**
     * 3小时
     */
    public static final int UPDATE_TIME_LOOP_TIME = 3 * 60 * 60 * 1000;

    /**
     * 枚举工厂的类型
     */
    public enum FACTORY_TYPE {
        VIEW_FACTORY, DATA_FACTORY, INTENT_FACTORY
    }

    /**
     * 枚举 view的类型
     */
    public enum VIEW_TYPE {
        IMAGE_VIEW, TEXT_VIEW, CHANNELNUM_TEXTVIEW, LEFT_LAYOUT, BOTTOM_LAYOUT, MTEXT_VIEW, MAIN_LAYOUT, LABEL_VIEW, TAB_VIEWPAGER, CHANNEL_LAYOUT, CHANNELRECYCLER_VIEW, CHANNEL_VIEW, AD_VIEW
    }

    /**
     * 枚举播放状态
     */
    public enum PLAY_STATUS {
        PLAING, STOPED
    }

    /**
     * 协议相关
     */
    public final class Protocol {
        public static final String PROTOCOL_MAIN_ACTION = "com.gzgd.live.action.MAIN";
        public static final String PROTOCOL_BOOT_ACTION = "android.intent.action.BOOT_COMPLETED";
        //public static final String PROTOCOL_PACKAGE_ACTION1 = "com.starcor.gzgd.app.general.action";
        public static final String PROTOCOL_PACKAGE_ACTION = "com.gzgd.live.launch.action";
        //搜索更新完毕广播action
        public static final String SEARCH_FINISH = "com.gzgd.livesearch.scan.finished";
        public static final String PROTOCOL_SOURCE_KEY = "source";
        //public static final String PROTOCOL_SOURCE_VAULE = "STARCOR";
        public static final String PROTOCOL_DATA_KEY = "data";
        public static final String PROTOCOL_TITLE_KEY = "title";
        public static final String PROTOCOL_LOGICNUM_KEY = "logicNum";
        public static final String PROTOCOL_CMD_KEY = "cmd";
        public static final String PROTOCOL_CMD_VALUE = "playLive";
        public static final String PROTOCOL_VIDEO_ID_KEY = "video_id";
        public static final String PROTOCOL_SOURCE_VALUE = "com.xxx.xxx";
        //设备授权监听
        public static final String PROTOCOL_AUTH_ACTION = "com.gzgd.auth.message";
    }

}
